//第五章
import javax.print.attribute.standard.PrinterMakeAndModel;
import java.util.Random;
public class Main {
    public static void main(String[] args) {
/*
        //字符串大小写的转换并倒序输出
        String str ="Hello World";
        char[] ch=str.toCharArray();
        StringBuffer buffer=new StringBuffer();
         for(int i=str.length()-1;i>=0;i--){
             if((ch[i]>='A')&&(ch[i]<='Z')){
                 buffer.append(String.valueOf(ch[i]).toLowerCase());
             }
             else if((ch[i]>='a')&&(ch[i]<='z')){
                 buffer.append(String.valueOf(ch[i]).toUpperCase());
             }
         }
        System.out.println(buffer.toString());

 */

        //Random类来产生5个20~30之间的随机整数
        Random rand=new Random();
        int[] num=new int[5];

        for(int i=0;i<=num.length;i++){
            num[i]=20+rand.nextInt(11);
            System.out.println(num[i]);
        }
    }
}
